import java.time.LocalDateTime;

public class Log {
    private LocalDateTime time;
    private String type;
    private String operator;

    public Log(String type, String operator) {
        this.time = LocalDateTime.now();
        this.type = type;
        this.operator = operator;
    }

    public void saveLog() {
        System.out.printf("[日志] %s %s 执行了 %s%n", 
                time.toString().substring(0, 19), operator, type);
    }
}